import 'package:flutter/cupertino.dart';

class vertical_list extends StatefulWidget {
  vertical_list({Key key, this.cattoon_list}) : super(key: key);
  List cattoon_list;
  @override
  State<vertical_list> createState() => _vertical_listState();
}

class _vertical_listState extends State<vertical_list> {
  @override
  Widget build(BuildContext context) {
    return Wrap(
      children: widget.cattoon_list
          .map((v) => GestureDetector(
                onTap: () {
                  // 跳转到动漫界面
                  print(v['cartoon']);
                },
                child: Container(
                    margin: EdgeInsets.only(top: 10),
                    // color: Colors.red,
                    height: 110,
                    // width: 150,
                    child: Row(
                      children: [
                        Container(
                          margin: EdgeInsets.only(left: 10),
                          height: 100,
                          width: 75,
                          child: Image(
                            fit: BoxFit.fill,
                            image: NetworkImage(v['imageUrl'].toString()),
                            // image: ,
                          ),
                        ),
                        Container(
                          width: 200,
                          child: Column(
                            children: [
                              Row(children: [
                                Container(
                                    // color: Colors.red,
                                    margin: EdgeInsets.only(
                                        top: 2, left: 14, bottom: 4),
                                    child: Text(
                                      v['name'],
                                      style: TextStyle(fontSize: 22),
                                    )),
                              ]),
                              Row(children: [
                                Container(
                                    // color: Colors.red,
                                    margin: EdgeInsets.only(left: 14),
                                    child: Text(v['author'])),
                                // Expanded(child: )
                              ]),
                              Row(children: [
                                Container(
                                    // color: Colors.red,
                                    margin: EdgeInsets.only(left: 14),
                                    child: Text(v['tage'])),
                                // Expanded(child: )
                              ]),
                              Row(children: [
                                Container(
                                    // color: Colors.red,
                                    margin: EdgeInsets.only(left: 14),
                                    child: Text(v['stae'])),
                                // Expanded(child: )
                              ]),
                            ],
                          ),
                        )
                      ],
                    )),
              ))
          .toList(),
    );
  }
}
